package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the WAIT_DEAL_STYLE database table.
 * 
 */
@Entity
@Table(name="WAIT_DEAL_STYLE")
@NamedQuery(name="WaitDealStyle.findAll", query="SELECT w FROM WaitDealStyle w")
public class WaitDealStyle implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="WAIT_DEAL_STYLE_DEALSTYLE_GENERATOR", sequenceName="SEQ_53")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="WAIT_DEAL_STYLE_DEALSTYLE_GENERATOR")
	@Column(name="DEAL_STYLE")
	private long dealStyle;

	@Column(name="DEAL_STYLE_CONTAIN")
	private String dealStyleContain;

	//bi-directional many-to-one association to WaitDeal
	@OneToMany(mappedBy="waitDealStyle")
	private List<WaitDeal> waitDeals;

	public WaitDealStyle() {
	}

	public long getDealStyle() {
		return this.dealStyle;
	}

	public void setDealStyle(long dealStyle) {
		this.dealStyle = dealStyle;
	}

	public String getDealStyleContain() {
		return this.dealStyleContain;
	}

	public void setDealStyleContain(String dealStyleContain) {
		this.dealStyleContain = dealStyleContain;
	}

	public List<WaitDeal> getWaitDeals() {
		return this.waitDeals;
	}

	public void setWaitDeals(List<WaitDeal> waitDeals) {
		this.waitDeals = waitDeals;
	}

	public WaitDeal addWaitDeal(WaitDeal waitDeal) {
		getWaitDeals().add(waitDeal);
		waitDeal.setWaitDealStyle(this);

		return waitDeal;
	}

	public WaitDeal removeWaitDeal(WaitDeal waitDeal) {
		getWaitDeals().remove(waitDeal);
		waitDeal.setWaitDealStyle(null);

		return waitDeal;
	}

}